﻿@using Abp.Web.Mvc.Extensions
@using MyCompanyName.AbpZeroTemplate.Authorization
@using MyCompanyName.AbpZeroTemplate.Web.Navigation
@{
    ViewBag.CurrentPageName = PageNames.App.Common.Product;//作用就是选中菜单时会高亮
}
@section Styles{
    @Html.IncludeStyle("~/libs/bootstrap-fileinput/bootstrap-fileinput.css")
}
@section Scripts
{
    @Html.IncludeScript("~/Areas/Mpa/Views/Product/Index.js")
    @Html.IncludeScript("~/libs/bootstrap-fileinput/bootstrap-fileinput.js")
    @Html.IncludeScript("~/libs/ajax-fileupload/ajaxfileupload.js")
}
<div class="row margin-bottom-5">
    <div class="col-xs-6">
        <div class="page-head">
            <div class="page-title">
                <h1>
                    <span>@L("Product")</span> <small>@L("ProductManager")</small>
                </h1>
            </div>
        </div>
    </div>
    @*这里是添加的按钮代码*@
    <div class="col-xs-6 text-right">
        @if (IsGranted(AppPermissions.Pages_Product_Create)) //判断是否有添加分类的权限
        {
            <button id="CreateNewProductButton" class="btn btn-primary blue"><i class="fa fa-plus"></i>@L("Product_Create")</button>
        }
    </div>
</div>
<div class="portlet light">
    <div class="portlet-title portlet-title-filter">
        <div class="inputs inputs-full-width">
            <div class="portlet-input">
                <form>
                    <div class="row">
                        <div class="col-md-4">
                            <label class="control-label">@L("Product_CategoryName")</label>
                            <div class="form-group">
                                @Html.DropDownList("CategoryId", @ViewBag.categories as SelectList, "请选择", new {@class = "form-control"})
                            </div>
                        </div>
                        <div class="col-md-4">
                            <label class="control-label">@L("Product_Name")</label>
                            <div class="form-group">
                                <input type="text" class="form-control" name="Name" id="Name"/>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <label class="control-label">@L("Product_Price")</label>
                            <div class="input-group">
                                <input type="number" class="form-control" name="StartPrice" id="StartPrice"/>
                                <span class="input-group-addon">---</span>
                                <input type="number" class="form-control" name="EndPrice" id="EndPrice"/>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6"></div>
                        <div class="col-sm-6 text-right">
                            <button id="GetProductButton" class="btn blue"><i class=" fa fa-search"></i>@L("SearchWithThreeDot")</button>
                            <button id="ClearProductButton" class="btn red">@L("Clear")</button>
                        </div>

                    </div>
            </form>
            </div>
        </div>
    </div>
    <div class="portlet-body">
        <div>
            <div id="ProductsTable"></div>
        </div>
    </div>
</div>
